﻿using HRT.Procotol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QGDW {

    class A {
        public char a = 'a';
        public virtual char AP {
            set { this.a = value; }
            get { return this.a; }
        }
        public virtual char GetAP() {
            return this.AP;
        }
    }
    class B : A {
        public new char a = 'b';
        public char b = 'b';
        public override char AP {
            set { this.b = value; }
            get { return this.b; }
        }
        private Byte[] bArray;
        public Byte[] BArray {
            set => this.bArray = value;
            get => this.bArray;
        }
    }
    class TestMain {
        public static void Main() {
            QGDW1376_2 packet = QGDW1376_2_Factory.CreatePacket(0x12, 0x2);
            packet.Seq = 0x12;
            Byte[] packetByte = packet.ToByte();
            foreach(Byte data in packetByte) {
                Console.Write("{0:x} ", data);
            }
            Console.WriteLine();
            Console.WriteLine(packet.AFN);
            QGDW1376_2 tmp = QGDW1376_2_Factory.CreatePacket(new Byte[] { 0x68, 0xf, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x12, 0x12, 0x2, 0x0, 0x27, 0x16 });
            Console.WriteLine(tmp.Fn);
        }
    }
}